package com.liugh.entity.standard;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**公告表
 * Created by Fatao on 2018/10/31 .
 */

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("tb_announcement")
public class Announcement extends Model<Announcement> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private int id;

    /**
     * 公告标题
     */
    @TableField("title")
    private String title;

    /**
     * 0-普通公告
     * 1-会议纪要
     */
    @TableField("type")
    private int type;

    /**
     * 公告内容
     */
    @TableField("content")
    private String content;

    /**
     * 上传者
     */
    @TableField("author")
    private String author;

    /**
     * 附件存储的位置
     */
    @TableField("attachment")
    private String attachment;

    @TableField("create_time")
    private Date createTime;


    /**
     * 专家名单
     */
    @TableField("expert")
    private String expert;

    @TableField(exist = false)
    private String authorName;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
